Repository navigation
fix(events): match listing duplicates by headliner and venue identity - #3966
Merged
Merged
Conversation
Multi-venue listing imports title shows 'Headliner with Support at Venue'
and name venues loosely ('Iron Horse Music Hall' for 'The Iron Horse').
Add a headliner + venue-identity duplicate strategy and resolve
address-less same-city venue name variants to the existing term,
reporting ambiguity when more than one term matches.
Closes #3965
…ation instead of stranding the event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3965
Problem
The mosplaceradio.com/bandschedules listings import (flow 983, job 1986789) created 341 events and matched 0 existing ones. The AI step sends a venue name plus city/state with no street address, titles like
Headliner with Support at Venue, and loose venue names. Two gaps:Venue_Taxonomy::resolve_venue_identity):Iron Horse Music HallvsThe Iron Horse,Paradise Rock ClubvsParadise Rock Club presented by Citizens,RoadrunnervsRoadrunner-Boston,John F. Swope Theater, Capitol Center for the ArtsvsCapitol Center for the Arts. The exact, article and normalized tiers miss these, and the core-name tier needs exact core equality. Result: about 100 new venue terms.EventDuplicateStrategy): even on the same venue term, the fuzzy title check compares full titles (fantastic cat at iron horse music hallvsfantastic cat at iron horse 2 shows,hunxhovshunxho 2night only tour), so the result was CLEAR.Fix
Venue_Taxonomy: newvenue_variant_key()andvenue_names_are_variants(), built oncore_venue_name(). They strip "presented/powered/sponsored/hosted by …", a trailing parenthetical, a "-" suffix, a trailing "music hall", and a standalone "at", and also accept a multi-word prefix or aRoom, Venuecomma part.resolve_core_name_tier()accepts these variants only when the incoming venue has no street address and has a city. It still requireshas_positive_location_evidence(). More than one compatible term returnsambiguous(no term is created). A match reportsmatched_via = name_variant.EventDuplicateStrategy: new Strategy 2b,findByHeadlinerAndVenueIdentity(). It comparesheadlinerKey()(strips " at " or a venue variant, support/co-bill lists, tour or ":" subtitles, and accents; keeps "Late Show" / "Night 2" set names) for same-day candidates at the same venue term or at a same-city name-variant term. Time window: the normal window, or the strict one-hour window for low-confidence keys. Outside the window, a single cross-source candidate is accepted (mirrors Strategy 2), except for low-confidence keys at a variant venue.Prod evidence (read-only simulation over the 82 already-trashed duplicates from this import)
name_variantmatches, 0 ambiguous, and none across cities. Examples: Roadrunner → Roadrunner-Boston, The Sinclair → The Sinclair Music Hall, The Drake → The Drake - Amherst, Brighton Music Hall → … presented by Citizens. Two are room- or stage-level merges, allowed by the prefix rule: Off the Rails (Worcester) → Off The Rails Outdoors, and Arts at the Armory Cafe → Arts at the Armory.Rockwell(Boston) vsRockwell - MA(Somerville), because the cities differ.Tests
tests/Unit/EventDuplicateHeadlinerVenueTest.php: Hunxho/Big Night Live tour suffix (same time and cross-source), Whitechapel support list, Iron Horse variant venue, Béla Fleck accents with a room-qualified venue, Street Dogs sponsor variant. Negatives: different headliners at different venues, same headliner at two different same-city venues,Open Mic at XvsOpen Mic at Y, same headliner in a different city, one-word headliner at a variant venue outside the window. PlusheadlinerKey()cases.tests/Unit/VenueTaxonomyListingVariantTest.php:Iron Horse Music Hall+ Northampton, MA resolves toThe Iron Horse(name_variant). Variant data provider. Two-term ambiguous case. Other-city, no-city and street-address negatives. Single-word-prefix negative.Left out
get_terms()rows once such a term exists. Accent folding is covered viaheadlinerKey()tests and was verified on prod MySQL (e.g.Esme Hotel Rooftop Music Hall→Esmé Hotel Rooftop).Ciné) are never treated as variants (existingFUZZY_NAME_MIN_LENGTH).Wilbur TheatrevsHava Nightclub,Off the RailsWorcester vsOff The Rails Boston,House of Blues - BostonvsCitizens House of Blues Boston, sponsor prefixes) stay unmatched on purpose.Written by Extra Chill Bot (AI agent) on behalf of Chris Huber.